<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:form="http://java.sun.com/jsf/composite/components/form"
	template="/templates/include/securedmain.xhtml">

	<ui:define name="content">
			<h:outputText value="#{msg['view.usereditchangepass.form.notpossible']}" rendered="#{!editUserBean.passwordStoredLocally}"/>

		<h:form id="form" rendered="#{editUserBean.passwordStoredLocally}">
		
			<p:growl id="growl" showDetail="true" sticky="false" />
			<h:panelGrid columns="2">
				<f:facet name="header">
					<h:outputText value="#{msg['view.usereditchangepass.form.head']}:" />
				</f:facet>

				<h:outputLabel for="nickname"
					value="#{msg['properties.user.nickname']}:" />
				<h:outputText value="#{editUserBean.selectedUser.nickname}"
					id="nickname" required="true" />

				<h:outputLabel for="pwd1"
					value="#{msg['properties.user.password']}:" />
				<p:password minLength="5" id="pwd1" value="#{editUserBean.selectedUser.passhash}"
					match="pwd2" required="true" feedback="true" converter="md5converver"/>

				<h:outputLabel for="pwd2"
					value="#{msg['properties.user.passwordagain']}:" />
				<p:password minLength="5" id="pwd2" value="#{editUserBean.selectedUser.passhash}"
					required="true" converter="md5converver"/>

				<f:facet name="footer">
					<p:commandButton id="commitButton" action="#{editUserBean.edit}"
						value="#{msg['view.actions.button.commit']}" update="@form"
						ajax="false" />
				</f:facet>
			</h:panelGrid>
		</h:form>
	</ui:define>
</ui:composition>
